public DO_SetNextMapCampaign(Handle:convar, const String:oldValue[], const String:newValue[])
{
	if(GetConVarInt(g_Fix) == 1 && (!IsSetMap)){
		IsSetMap = true
		CreateTimer(15.0, SetNextMapCampaign)
	}
}

//---------------------------------------------------------------//
// Here we are trying to set the right map for the campaign maps //
//---------------------------------------------------------------//
public Action:SetNextMapCampaign(Handle:timer)
{
	IsSetMap = true
	new mapCount = GetMapHistorySize()	
	if (mapCount <= 0)
		return Plugin_Handled
	
	decl String:lastMap[32]
	decl String:changeReason[100]
	new startTime
	GetMapHistory(0, lastMap, sizeof(lastMap), changeReason, sizeof(changeReason), startTime)
	if (Debug)
		PrintToServer("[SYN] The Last map:%s", lastMap)
	
	decl String:currentMap[64]
	GetCurrentMap(currentMap, sizeof(currentMap))
	if (Debug)
		PrintToServer("[SYN] Currentmap:%s", currentMap)

	if(StrContains(currentMap, "d1_", false) == 0 || StrContains(currentMap, "d2_", false) == 0 || StrContains(currentMap, "d3_", false) == 0)
	{
		if(StrContains(currentMap, "d1_trainstation", false) == 0)
		{
			if(strcmp(currentMap, "d1_trainstation_01", false) == 0)
			SetNextMap("d1_trainstation_02")
			
			else if(strcmp(currentMap, "d1_trainstation_02", false) == 0)
			SetNextMap("d1_trainstation_03")
			
			else if(strcmp(currentMap, "d1_trainstation_03", false) == 0)
			SetNextMap("d1_trainstation_04")
			
			else if(strcmp(currentMap, "d1_trainstation_04", false) == 0)
			SetNextMap("d1_trainstation_05")
			
			else if(strcmp(currentMap, "d1_trainstation_05", false) == 0)
			SetNextMap("d1_trainstation_06")
			
			else if(strcmp(currentMap, "d1_trainstation_06", false) == 0)
			SetNextMap("d1_canals_01")
		}
		
		else if(StrContains(currentMap, "d1_canals", false) == 0)
		{
			if(strcmp(currentMap, "d1_canals_01", false) == 0)
			SetNextMap("d1_canals_01a")
			
			else if(strcmp(currentMap, "d1_canals_01a", false) == 0)
			SetNextMap("d1_canals_02")
			
			else if(strcmp(currentMap, "d1_canals_02", false) == 0)
			SetNextMap("d1_canals_03")
			
			else if(strcmp(currentMap, "d1_canals_03", false) == 0)
			SetNextMap("d1_canals_05")
			
			else if(strcmp(currentMap, "d1_canals_05", false) == 0)
			SetNextMap("d1_canals_06")
			
			else if(strcmp(currentMap, "d1_canals_06", false) == 0)
			SetNextMap("d1_canals_07")
			
			else if(strcmp(currentMap, "d1_canals_07", false) == 0)
			SetNextMap("d1_canals_08")
			
			else if(strcmp(currentMap, "d1_canals_08", false) == 0)
			SetNextMap("d1_canals_09")
			
			else if(strcmp(currentMap, "d1_canals_09", false) == 0)
			SetNextMap("d1_canals_10")
			
			else if(strcmp(currentMap, "d1_canals_10", false) == 0)
			SetNextMap("d1_canals_11")
			
			else if(strcmp(currentMap, "d1_canals_11", false) == 0)
			SetNextMap("d1_canals_12")
			
			else if(strcmp(currentMap, "d1_canals_12", false) == 0)
			SetNextMap("d1_canals_13")
			
			else if(strcmp(currentMap, "d1_canals_13", false) == 0)
			SetNextMap("d1_eli_01")
		}

		else if(StrContains(currentMap, "d1_eli", false) == 0)
		{
			if(strcmp(currentMap, "d1_eli_01", false) == 0)
			SetNextMap("d1_eli_02")
			
			else if(strcmp(currentMap, "d1_eli_02", false) == 0)
			SetNextMap("d1_town_01")
		}

		else if(StrContains(currentMap, "d1_town", false) == 0)
		{
			if(strcmp(currentMap, "d1_town_01", false) == 0)
			SetNextMap("d1_town_01a")
			
			else if(strcmp(currentMap, "d1_town_01a", false) == 0)
			SetNextMap("d1_town_02")
			
			else if(strcmp(currentMap, "d1_town_02", false) == 0 && strcmp(lastMap, "d1_town_01a", false) == 0)
			SetNextMap("d1_town_03")
			
			else if(strcmp(currentMap, "d1_town_03", false) == 0)
			SetNextMap("d1_town_02")
			
			else if(strcmp(currentMap, "d1_town_02", false) == 0 && strcmp(lastMap, "d1_town_03", false) == 0)
			SetNextMap("d1_town_02a")
			
			else if(strcmp(currentMap, "d1_town_02a", false) == 0)
			SetNextMap("d1_town_04")
			
			else if(strcmp(currentMap, "d1_town_04", false) == 0)
			SetNextMap("d1_town_05")
			
			else if(strcmp(currentMap, "d1_town_05", false) == 0)
			SetNextMap("d2_coast_01")
		}
		
		else if(StrContains(currentMap, "d2_coast", false) == 0)
		{
			if(strcmp(currentMap, "d2_coast_01", false) == 0)
				SetNextMap("d2_coast_03")
			
			else if(strcmp(currentMap, "d2_coast_03", false) == 0)
				SetNextMap("d2_coast_04")
			
			else if(strcmp(currentMap, "d2_coast_04", false) == 0)
				SetNextMap("d2_coast_05")
			
			else if(strcmp(currentMap, "d2_coast_05", false) == 0)
				SetNextMap("d2_coast_07")
			
			else if(strcmp(currentMap, "d2_coast_07", false) == 0 && strcmp(lastMap, "d2_coast_05", false) == 0)
				SetNextMap("d2_coast_08")
			
			else if(strcmp(currentMap, "d2_coast_08", false) == 0)
				SetNextMap("d2_coast_07")
			
			else if(strcmp(currentMap, "d2_coast_07", false) == 0 && strcmp(lastMap, "d2_coast_08", false) == 0)
				SetNextMap("d2_coast_09")
			
			else if(strcmp(currentMap, "d2_coast_09", false) == 0)
				SetNextMap("d2_coast_10")
			
			else if(strcmp(currentMap, "d2_coast_10", false) == 0)
				SetNextMap("d2_coast_11")
			
			else if(strcmp(currentMap, "d2_coast_11", false) == 0)
				SetNextMap("d2_coast_12")
			
			else if(strcmp(currentMap, "d2_coast_12", false) == 0)
				SetNextMap("d2_prison_01")
		}
			
		else if(StrContains(currentMap, "d2_prison", false) == 0)
		{
			if(strcmp(currentMap, "d2_prison_01", false) == 0)
				SetNextMap("d2_prison_02")
			
			else if(strcmp(currentMap, "d2_prison_02", false) == 0)
				SetNextMap("d2_prison_03")
			
			else if(strcmp(currentMap, "d2_prison_03", false) == 0)
				SetNextMap("d2_prison_04")
			
			else if(strcmp(currentMap, "d2_prison_04", false) == 0)
				SetNextMap("d2_prison_05")
			
			else if(strcmp(currentMap, "d2_prison_05", false) == 0)
				SetNextMap("d2_prison_06")
			
			else if(strcmp(currentMap, "d2_prison_06", false) == 0)
				SetNextMap("d2_prison_07")
			
			else if(strcmp(currentMap, "d2_prison_07", false) == 0)
				SetNextMap("d2_prison_08")
			
			else if(strcmp(currentMap, "d2_prison_08", false) == 0)
				SetNextMap("d3_c17_01")
		}
		
		else if(StrContains(currentMap, "d3_c17", false) == 0)
		{
			if(strcmp(currentMap, "d3_c17_01", false) == 0)
				SetNextMap("d3_c17_02")
			
			else if(strcmp(currentMap, "d3_c17_02", false) == 0)
				SetNextMap("d3_c17_03")
			
			else if(strcmp(currentMap, "d3_c17_03", false) == 0)
				SetNextMap("d3_c17_04")
			
			else if(strcmp(currentMap, "d3_c17_04", false) == 0)
				SetNextMap("d3_c17_05")
			
			else if(strcmp(currentMap, "d3_c17_05", false) == 0)
				SetNextMap("d3_c17_06a")
			
			else if(strcmp(currentMap, "d3_c17_06a", false) == 0)
				SetNextMap("d3_c17_06b")
			
			else if(strcmp(currentMap, "d3_c17_06b", false) == 0)
				SetNextMap("d3_c17_07")
			
			else if(strcmp(currentMap, "d3_c17_07", false) == 0)
				SetNextMap("d3_c17_08")
			
			else if(strcmp(currentMap, "d3_c17_08", false) == 0)
				SetNextMap("d3_c17_09")
			
			else if(strcmp(currentMap, "d3_c17_09", false) == 0)
				SetNextMap("d3_c17_10a")
			
			else if(strcmp(currentMap, "d3_c17_10a", false) == 0)
				SetNextMap("d3_c17_10b")
			
			else if(strcmp(currentMap, "d3_c17_10b", false) == 0)
				SetNextMap("d3_c17_11")
			
			else if(strcmp(currentMap, "d3_c17_11", false) == 0)
				SetNextMap("d3_c17_12")
			
			else if(strcmp(currentMap, "d3_c17_12", false) == 0)
				SetNextMap("d3_c17_12b")
			
			else if(strcmp(currentMap, "d3_c17_12b", false) == 0)
				SetNextMap("d3_c17_13")
			
			else if(strcmp(currentMap, "d3_c17_13", false) == 0)
				SetNextMap("d3_citadel_01")
		}
		
		else if(StrContains(currentMap, "d3_citadel", false) == 0)
		{
			if(strcmp(currentMap, "d3_citadel_01", false) == 0)
				SetNextMap("d3_citadel_02")
			
			else if(strcmp(currentMap, "d3_citadel_02", false) == 0)
				SetNextMap("d3_citadel_03")
			
			else if(strcmp(currentMap, "d3_citadel_03", false) == 0)
				SetNextMap("d3_citadel_04")
			
			else if(strcmp(currentMap, "d3_citadel_04", false) == 0)
				SetNextMap("d3_citadel_05")
			
			else if(strcmp(currentMap, "d3_citadel_05", false) == 0)
				SetNextMap("d3_breen_01")
		}
		
		else if(StrContains(currentMap, "d3_breen_01", false) == 0)
			SetNextMap("ep1_citadel_00")
	}
	
/* EPISODE 1 */
	if(StrContains(currentMap, "ep1_", false) == 0)
	{
		if(strcmp(currentMap, "ep1_citadel_00", false) == 0)
			SetNextMap("ep1_citadel_01")
		
		else if(strcmp(currentMap, "ep1_citadel_01", false) == 0)
			SetNextMap("ep1_citadel_02")
		
		else if(strcmp(currentMap, "ep1_citadel_02", false) == 0)
			SetNextMap("ep1_citadel_02b")
		
		else if(strcmp(currentMap, "ep1_citadel_02b", false) == 0)
			SetNextMap("ep1_citadel_03")
		
		else if(strcmp(currentMap, "ep1_citadel_03", false) == 0)
			SetNextMap("ep1_citadel_04")
		
		else if(strcmp(currentMap, "ep1_citadel_04", false) == 0)
			SetNextMap("ep1_c17_00")
		
		else if(strcmp(currentMap, "ep1_c17_00", false) == 0)
			SetNextMap("ep1_c17_00a")
		
		else if(strcmp(currentMap, "ep1_c17_00a", false) == 0)
			SetNextMap("ep1_c17_01")
		
		else if(strcmp(currentMap, "ep1_c17_01", false) == 0)
			SetNextMap("ep1_c17_02")
		
		else if(strcmp(currentMap, "ep1_c17_02", false) == 0)
			SetNextMap("ep1_c17_02b")
		
		else if(strcmp(currentMap, "ep1_c17_02b", false) == 0)
			SetNextMap("ep1_c17_02a")
		
		else if(strcmp(currentMap, "ep1_c17_02a", false) == 0)
			SetNextMap("ep1_c17_05")
		
		else if(strcmp(currentMap, "ep1_c17_05", false) == 0)
			SetNextMap("ep1_c17_06")
			
		else if(strcmp(currentMap, "ep1_c17_06", false) == 0)
			SetNextMap("ep2_outland_01")
	}

/* EPISODE 2 */
	if(StrContains(currentMap, "ep2_", false) == 0)
	{
		if(strcmp(currentMap, "ep2_outland_01", false) == 0)
			SetNextMap("ep2_outland_01a")
		
		else if(strcmp(currentMap, "ep2_outland_01a", false) == 0)
			SetNextMap("ep2_outland_02")
		
		else if(strcmp(currentMap, "ep2_outland_02", false) == 0 && strcmp(lastMap, "ep2_outland_01a", false) == 0)
			SetNextMap("ep2_outland_03")
		
		else if(strcmp(currentMap, "ep2_outland_03", false) == 0)
			SetNextMap("ep2_outland_04")
		
		else if(strcmp(currentMap, "ep2_outland_04", false) == 0)
			SetNextMap("ep2_outland_02")
		
		else if(strcmp(currentMap, "ep2_outland_02", false) == 0 && strcmp(lastMap, "ep2_outland_04", false) == 0)
			SetNextMap("ep2_outland_05")
		
		else if(strcmp(currentMap, "ep2_outland_05", false) == 0)
			SetNextMap("ep2_outland_06")
		
		else if(strcmp(currentMap, "ep2_outland_06", false) == 0)
			SetNextMap("ep2_outland_06a")
		
		else if(strcmp(currentMap, "ep2_outland_06a", false) == 0)
			SetNextMap("ep2_outland_07")
		
		else if(strcmp(currentMap, "ep2_outland_07", false) == 0)
			SetNextMap("ep2_outland_08")
		
		else if(strcmp(currentMap, "ep2_outland_08", false) == 0)
			SetNextMap("ep2_outland_09")
		
		else if(strcmp(currentMap, "ep2_outland_09", false) == 0)
			SetNextMap("ep2_outland_10")
		
		else if(strcmp(currentMap, "ep2_outland_10", false) == 0)
			SetNextMap("ep2_outland_10a")
		
		else if(strcmp(currentMap, "ep2_outland_10a", false) == 0)
			SetNextMap("ep2_outland_11")
		
		else if(strcmp(currentMap, "ep2_outland_11", false) == 0)
			SetNextMap("ep2_outland_11a")
		
		else if(strcmp(currentMap, "ep2_outland_11a", false) == 0)
			SetNextMap("ep2_outland_11b")
		
		else if(strcmp(currentMap, "ep2_outland_11b", false) == 0)
			SetNextMap("ep2_outland_12")
		
		else if(strcmp(currentMap, "ep2_outland_12", false) == 0)
			SetNextMap("ep2_outland_12a")
	}
	return Plugin_Handled
}